]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR target/65697 (__atomic memory barriers not strong enough for __sync builtins)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
b155cfd9
MP
12015-06-29 Marek Polacek <polacek@redhat.com>
2
3 PR c/66322
4 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
5 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
6 about -Wswitch-bool here.
7 (do_case): Update c_add_case_label call.
8 (c_finish_case): Update c_do_switch_warnings call.
9
31521951
MP
102015-06-27 Marek Polacek <polacek@redhat.com>
11
12 * c-typeck.c: Use VECTOR_TYPE_P throughout.
13
22d03525
MP
142015-06-26 Marek Polacek <polacek@redhat.com>
15
16 * c-array-notation.c (fix_builtin_array_notation_fn): Use
17 INDIRECT_REF_P.
18 * c-typeck.c (array_to_pointer_conversion): Likewise.
19 (build_unary_op): Likewise.
20 (c_finish_return): Likewise.
21
f0889939
AM
222015-06-25 Andrew MacLeod <amacleod@redhat.com>
23
24 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
25 * c-parser.c: Likewise.
26
8d67ee55
RS
272015-06-25 Richard Sandiford <richard.sandiford@arm.com>
28
29 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
30 instead of pointer_hash.
31 (detect_field_duplicates): Likewise.
32
0ae9bd27
MP
332015-06-25 Marek Polacek <polacek@redhat.com>
34
35 * c-array-notation.c: Use VAR_P throughout.
36 * c-decl.c: Likewise.
37 * c-objc-common.c: Likewise.
38 * c-parser.c: Likewise.
39 * c-typeck.c: Likewise.
40
62f9079a
MP
412015-06-25 Marek Polacek <polacek@redhat.com>
42
43 * c-decl.c: Use is_global_var throughout.
44 * c-parser.c: Likewise.
45 * c-typeck.c: Likewise.
46
abb226c9
AM
472015-06-17 Andrew MacLeod <amacleod@redhat.com>
48
49 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
50 * c-aux-info.c: Likewise.
51 * c-convert.c: Likewise.
52 * c-decl.c: Likewise.
53 * c-errors.c: Likewise.
54 * c-lang.c: Likewise.
55 * c-objc-common.c: Likewise.
56 * c-parser.c: Likewise.
57 * c-typeck.c: Likewise.
58
8cbababc
JH
592015-06-11 Jan Hubicka <hubicka@ucw.cz>
60
61 PR middle-end/66325
62 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
63 variants.
64
a0349665
PMR
652015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
66
67 * c-decl.c (pop_scope): Register the main translation unit
68 through the new debug hook.
69
13fdf2e2
AM
702015-06-08 Andrew MacLeod <amacleod@redhat.com>
71
72 * c-array-notation.c : Adjust include files.
73 * c-aux-info.c : Likewise.
74 * c-convert.c : Likewise.
75 * c-decl.c : Likewise.
76 * c-errors.c : Likewise.
77 * c-lang.c : Likewise.
78 * c-lang.h : Likewise.
79 * c-objc-common.c : Likewise.
80 * c-parser.c : Likewise.
81 * c-typeck.c : Likewise.
82
d7438551
AH
832015-06-05 Aldy Hernandez <aldyh@redhat.com>
84
85 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
86 immediately clobber it.
87 (c_write_global_declarations_1): Remove call to
88 check_global_declaration_1.
89 (c_write_global_declarations_2): Remove.
90 (c_write_final_cleanups): Rename from c_write_global_declarations.
91 Remove call to finalize_compilation_unit.
92 Remove calls to debugging hooks.
93 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
94 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
95 * c-tree.h: Remove c_write_global_declarations.
96
ecb9f223
AM
972015-06-04 Andrew MacLeod <amacleod@redhat.com>
98
99 * c-array-notation.c: Adjust includes for restructured coretypes.h.
100 * c-aux-info.c: Likewise.
101 * c-convert.c: Likewise.
102 * c-decl.c: Likewise.
103 * c-errors.c: Likewise.
104 * c-lang.c: Likewise.
105 * c-objc-common.c: Likewise.
106 * c-parser.c: Likewise.
107 * c-typeck.c: Likewise.
108
9482b620
MP
1092015-06-04 Marek Polacek <polacek@redhat.com>
110
111 PR c/66341
112 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
113 it is a lvalue.
114
bc51ace3
PK
1152015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
116
117 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
118 Warn for empty struct.
119 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
120
ea5b45b6
AT
1212015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
122
123 * c-decl.c (start_function): Call plugin before parsing.
124 (finish_function): Call plugin after parsing.
125
c2d47482
PK
1262015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
127
128 PR c/49551
129 * c-decl.c (merge_decls): Merge DECL_COMMON.
130
a95492ab
JW
1312015-05-22 Jim Wilson <jim.wilson@linaro.org>
132
133 * Make-lang.in (check_gcc_pallelize): Define.
134
fd5c817a
MP
1352015-05-22 Marek Polacek <polacek@redhat.com>
136
137 PR c/47043
138 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
139 attributes.
140
c7b70a3c
MP
1412015-05-21 Marek Polacek <polacek@redhat.com>
142
143 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
144 DECL_BUILT_IN.
145
21b634ae
MP
1462015-05-20 Marek Polacek <polacek@redhat.com>
147
148 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
149 * c-typeck.c: Likewise.
150
296a8c2f
MP
1512015-05-19 Marek Polacek <polacek@redhat.com>
152
153 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
154
41b37d5e
JJ
1552015-05-19 Jakub Jelinek <jakub@redhat.com>
156
157 PR middle-end/66199
158 * c-parser.c (c_parser_omp_for_loop): Don't add
159 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
160 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
161 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
162 constructs.
163
fab27f52
MM
1642015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
165
166 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 167 swaps.
fab27f52 168
40de31cf
MLI
1692015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
170
171 PR fortran/44054
172 * c-objc-common.c (c_tree_printer): Replace locus pointer with
173 accessor function.
174
3aa3c9fc
MP
1752015-05-14 Marek Polacek <polacek@redhat.com>
176
177 PR c/66066
178 PR c/66127
179 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
180 rather than with 0.
181
c3388e62
DM
1822015-05-12 David Malcolm <dmalcolm@redhat.com>
183
184 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
185 to add a call to warn_for_misleading_indentation.
186 (c_parser_else_body): Likewise, adding param "else_loc".
187 (c_parser_if_statement): Check for misleading indentation.
188 (c_parser_while_statement): Likewise.
189 (c_parser_for_statement): Likewise.
190
755e528f
MP
1912015-05-08 Marek Polacek <polacek@redhat.com>
192
193 PR c/64918
194 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
195 (output_init_element): Likewise.
196
0173bd2a
MP
1972015-05-07 Marek Polacek <polacek@redhat.com>
198
199 PR c/65179
200 * c-typeck.c (build_binary_op): Warn when left shifting a negative
201 value.
202
9babc352
MP
2032015-04-30 Marek Polacek <polacek@redhat.com>
204
205 * c-typeck.c (set_init_label): Call error_at instead of error and
206 pass LOC to it.
207
ac9f18db
MP
208 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
209 the type of a decl.
210
ec3fba51
MP
211 * c-typeck.c (c_build_va_arg): Clarify the error message.
212
b811915d
TS
2132015-04-29 Thomas Schwinge <thomas@codesourcery.com>
214
215 * c-parser.c (c_parser_oacc_enter_exit_data): Use
216 OMP_STANDALONE_CLAUSES.
217
f3075008
MP
2182015-04-28 Marek Polacek <polacek@redhat.com>
219
220 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
221
4e81b788
MP
2222015-04-28 Marek Polacek <polacek@redhat.com>
223
224 PR c/65901
225 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
226
6c1db78e
MP
2272015-04-25 Marek Polacek <polacek@redhat.com>
228
229 PR c/52085
230 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
231 attribute.
232
5c4abbb8
MP
2332015-04-23 Marek Polacek <polacek@redhat.com>
234
235 PR c/65345
236 * c-decl.c (set_labels_context_r): New function.
237 (store_parm_decls): Call it via walk_tree_without_duplicates.
238 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
239 instead of create_tmp_var. Build TARGET_EXPR instead of
240 COMPOUND_EXPR.
241 (build_atomic_assign): Use create_tmp_var_raw instead of
242 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
243
06aca1d5
IV
2442015-04-20 Ilya Verbin <ilya.verbin@intel.com>
245
246 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
247 (c_parser_omp_target_update): Add missed %> to error_at ().
248
8fba1830
BRF
2492015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
250
251 PR target/55143
252 * c-decl.c (c_default_pointer_mode): Remove definition.
253 * c-tree.h (c_default_pointer_mode): Remove declaration.
254
62021f64
TB
2552015-03-27 Tobias Burnus <burnus@net-b.de>
256
257 PR c/65586
258 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
259 error out.
260 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
261 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
262 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
263
9b65e171
JJ
2642015-03-19 Jakub Jelinek <jakub@redhat.com>
265
266 * c-decl.c (c_decl_attributes): Also add "omp declare target"
267 attribute for DECL_EXTERNAL VAR_DECLs.
268
17958621
JJ
2692015-03-11 Jakub Jelinek <jakub@redhat.com>
270
271 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
272 argument.
273
7ccb1a11
JJ
2742015-03-10 Jakub Jelinek <jakub@redhat.com>
275
276 PR c/65120
277 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
278 before preparing arguments to warn_logical_not_parentheses.
279
01177669
JJ
2802015-03-09 Jakub Jelinek <jakub@redhat.com>
281
282 PR c/65120
283 * c-typeck.c (parser_build_binary_op): Don't warn for
284 !!x == y or !b == y where b is _Bool.
285
802ac282
MP
2862015-03-09 Marek Polacek <polacek@redhat.com>
287
288 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
289 * c-decl.c (grokdeclarator): Likewise.
290 * c-typeck.c (build_binary_op): Likewise.
291
e5165b60
MP
2922015-02-27 Marek Polacek <polacek@redhat.com>
293
294 PR c/65228
295 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
296
065d214c
MP
2972015-02-14 Marek Polacek <polacek@redhat.com>
298
299 PR c/64768
300 * c-decl.c (grokdeclarator): Set the range of a flexible array member
301 declared through a typedef name.
302
e5d9235b
MP
3032015-02-13 Marek Polacek <polacek@redhat.com>
304
305 PR c/65050
306 * c-decl.c (grokdeclarator): Print also the type when giving
307 the error message about array's incomplete element type.
308
fa01ffcc
JJ
3092015-02-11 Jakub Jelinek <jakub@redhat.com>
310
311 PR c/64824
312 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
313 check in the POP macro.
314
c3e38a03
MP
3152015-02-09 Marek Polacek <polacek@redhat.com>
316
317 PR c/64856
318 * c-typeck.c (process_init_element): Don't always wrap
319 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
320 initializing a range of elements.
321
4886ec8e
JJ
3222015-02-04 Jakub Jelinek <jakub@redhat.com>
323
324 PR c/64824
325 PR c/64868
326 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
327
c3e38a03 3282015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
329
330 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
331 processing enum declaration.
332
7b33f0c8
MP
3332015-01-29 Marek Polacek <polacek@redhat.com>
334
335 PR c/64709
336 * c-typeck.c (pop_init_level): If constructor_elements has
337 exactly one element with integer_zerop value, set constructor_zeroinit
338 to 1. Remove braces around warning_init call.
339
dea63e49
JJ
3402015-01-27 Jakub Jelinek <jakub@redhat.com>
341
342 PR c/64766
343 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
344 of FUNCTION_DECLs with error_mark_node.
345
d38f7dce
JJ
3462015-01-26 Jakub Jelinek <jakub@redhat.com>
347
348 PR c/64778
349 * c-typeck.c (convert_arguments): Return -1 if there are
350 error_args, even if we've diagnosed too many arguments.
351
cbf5d0e7
RB
3522015-01-21 Richard Biener <rguenther@suse.de>
353
354 PR middle-end/64313
355 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
356 for builtins the user declared correctly.
357
41dbbb37
TS
3582015-01-15 Thomas Schwinge <thomas@codesourcery.com>
359 Bernd Schmidt <bernds@codesourcery.com>
360 Cesar Philippidis <cesar@codesourcery.com>
361 James Norris <jnorris@codesourcery.com>
362 Jakub Jelinek <jakub@redhat.com>
363 Ilmir Usmanov <i.usmanov@samsung.com>
364
365 * c-parser.c: Include "gomp-constants.h".
366 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
367 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
368 Use OMP_CLAUSE_SET_MAP_KIND.
369 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
370 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
371 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
372 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
373 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
374 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
375 "copyout", "create", "delete", "deviceptr", "gang", "host",
376 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
377 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
378 "present_or_create", "pcreate", "seq", "self", "vector",
379 "vector_length", "wait", "worker".
380 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
381 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
382 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
383 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
384 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
385 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
386 (c_parser_oacc_data_clause_deviceptr)
387 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
388 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
389 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
390 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
391 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
392 (c_parser_oacc_parallel, c_parser_oacc_update)
393 (c_parser_oacc_wait): New functions.
394 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
395 (c_finish_oacc_data): New prototypes.
396 * c-typeck.c: Include "gomp-constants.h".
397 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
398 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
399 OMP_CLAUSE_SET_MAP_KIND.
400 (c_finish_oacc_parallel, c_finish_oacc_kernels)
401 (c_finish_oacc_data): New functions.
402 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
403 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
404 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
405 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
406 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
407 GOMP_MAP_FORCE_DEVICEPTR.
408
adfac8df
JJ
4092015-01-09 Michael Collison <michael.collison@linaro.org>
410
411 * c-array-notation.c: Include hash-set.h, machmode.h,
412 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
413 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
414 * c-aux-info.c: Ditto.
415 * c-convert.c: Ditto.
416 * c-decl.c: Ditto.
417 * c-errors.c: Ditto.
418 * c-lang.c: Dittoxs.
419 * c-objc-common.c: Ditto.
420 * c-parser.c: Ditto.
421 * c-typeck.c: Include hash-set.h, machmode.h,
422 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
423 fold-const.h, wide-int.h, inchash.h, real.h and
424 fixed-value.h due to flattening of tree.h.
425
2cc901dc
MP
4262015-01-07 Marek Polacek <polacek@redhat.com>
427
428 PR c/64417
429 * c-typeck.c (process_init_element): Disallow initialization of
430 a flexible array member with a string constant if the structure
431 is in an array.
432
5624e564
JJ
4332015-01-05 Jakub Jelinek <jakub@redhat.com>
434
e5341100
JJ
435 PR sanitizer/64344
436 * c-typeck.c (convert_for_assignment, c_finish_return): For
437 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
438 types also set in_late_binary_op around convert call.
439 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
440 to integral type casts, if not in_late_binary_op, pass c_fully_fold
441 result on expr as last argument to ubsan_instrument_float_cast,
442 if in_late_binary_op, don't use c_save_expr but save_expr.
443
5624e564
JJ
444 Update copyright years.
445
5bd012f8
MP
4462015-01-05 Marek Polacek <polacek@redhat.com>
447
448 PR c/64423
449 * c-typeck.c (build_array_ref): Pass loc down to
450 warn_array_subscript_with_type_char.
451
768952be
MU
4522014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
453
454 * c-typeck.c: New behavious for pointers to arrays with qualifiers
455 (common-pointer-type): For pointers to arrays take qualifiers from
456 element type.
457 (build_conditional_expr): Add warnings for lost qualifiers.
458 (comp-target-types): Allow pointers to arrays with different qualifiers.
459 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
460 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
461 to PEDWARN_FOR_QUALIFIERS.
462
8f94a8c4
JJ
4632014-12-17 Jakub Jelinek <jakub@redhat.com>
464
465 PR sanitizer/64289
466 * c-convert.c: Include ubsan.h.
467 (convert): For real -> integral casts and
468 -fsanitize=float-cast-overflow don't call convert_to_integer, but
469 instead instrument the float cast directly.
470
b731b390
JJ
4712014-11-29 Jakub Jelinek <jakub@redhat.com>
472
473 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
474 c_finish_stmt_expr): Remove NULL last argument from
475 create_tmp_var_raw and create_tmp_var calls.
476 * c-array-notation.c (fix_builtin_array_notation_fn,
477 build_array_notation_expr, fix_conditional_array_notations_1,
478 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
479
541e35a6
MP
4802014-11-28 Marek Polacek <polacek@redhat.com>
481
482 PR c/63862
483 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
484 convert the right operand to integer type.
485
b286be94
MP
4862014-11-25 Marek Polacek <polacek@redhat.com>
487
488 PR c/63877
489 * c-decl.c (start_function): Disable -Wmissing-declarations warning
490 for inline functions.
491
aa7da51a
JJ
4922014-11-21 Jakub Jelinek <jakub@redhat.com>
493
494 PR target/63764
495 * c-typeck.c (build_array_ref): Adjust
496 convert_vector_to_pointer_for_subscript caller. If it returns true,
497 call non_lvalue_loc on the result.
498
d876207f
RB
4992014-11-11 Richard Biener <rguenther@suse.de>
500
501 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
502 to true.
503
e5e44252
AK
5042014-11-10 Andi Kleen <ak@linux.intel.com>
505
506 PR c/60804
507 * c-parser.c (c_parser_statement_after_labels): Call
508 check_no_cilk.
509 (c_parser_if_statement): Dito.
510 (c_parser_switch_statement): Dito.
511 (c_parser_while_statement): Dito.
512 (c_parser_do_statement): Dito.
513 (c_parser_for_statement): Dito.
514 * c-typeck.c (c_finish_loop): Dito.
515
13c21655
PC
5162014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
517
518 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
519 OPT_Wshift_count_overflow in the warnings.
520
2d51fcef
MP
5212014-10-30 Marek Polacek <polacek@redhat.com>
522
523 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
524 print the stripped version as well, if they're not the same.
525
ef4bddc2
RS
5262014-10-29 Richard Sandiford <richard.sandiford@arm.com>
527
528 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
529 machine_mode.
530
c582198b
AM
5312014-10-28 Andrew MacLeod <amacleod@redhat.com>
532
533 * c-decl.c: Adjust include files.
534 * c-parser.c: Ditto.
535
ddc8de03
PM
5362014-10-27 Phil Muldoon <pmuldoon@redhat.com>
537 Tom Tromey <tromey@redhat.com>
538
539 * c-tree.h (enum c_oracle_request): New.
540 (c_binding_oracle_function): New typedef.
541 (c_binding_oracle, c_pushtag, c_bind): Declare.
542 * c-decl.c (c_binding_oracle): New global.
543 (I_SYMBOL_CHECKED): New macro.
544 (i_symbol_binding): New function.
545 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
546 (I_TAG_CHECKED): New macro.
547 (i_tag_binding): New function.
548 (I_TAG_BINDING, I_TAG_DECL): Redefine.
549 (I_LABEL_CHECKED): New macro.
550 (i_label_binding): New function.
551 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
552 (c_print_identifier): Save and restore c_binding_oracle.
553 (c_pushtag, c_bind): New functions.
554
60393bbc
AM
5552014-10-27 Andrew MacLeod <amacleod@redhat.com>
556
557 * c-typeck.c: Adjust include files.
558
d723bb7c
MLI
5592014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
560
561 PR c++/53061
562 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
563 initialization here...
564 (c_initialize_diagnostics): ... but here. Set defaults after
565 building pretty-printer.
566
1bc5a451
MP
5672014-10-23 Marek Polacek <polacek@redhat.com>
568
569 PR c/63626
570 * c-decl.c (pop_scope): Don't print warning in external_scope.
571
4435bb92
MP
5722014-10-19 Marek Polacek <polacek@redhat.com>
573
574 PR c/63567
575 * c-typeck.c (output_init_element): Allow initializing objects with
576 static storage duration with compound literals even in C99 and add
577 pedwarn for it.
578
7278465e
MP
5792014-10-17 Marek Polacek <polacek@redhat.com>
580
581 PR c/63567
582 * c-typeck.c (digest_init): Allow initializing objects with static
583 storage duration with compound literals even in C99 and add pedwarn
584 for it.
585
d9b7be2e
MP
5862014-10-17 Marek Polacek <polacek@redhat.com>
587
588 PR c/63543
589 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
590 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
591 error multiple times. Print the type.
592
f406ae1f
MP
5932014-10-17 Marek Polacek <polacek@redhat.com>
594
595 PR c/63549
596 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
597 type.
598
92574c7c
MP
5992014-10-17 Marek Polacek <polacek@redhat.com>
600
601 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
602 (start_function): Use OPT_Wimplicit_int instead of 0.
603 (store_parm_decls_oldstyle): Likewise.
604
1bc4a978
MT
6052014-10-17 Alan Modra <amodra@gmail.com>
606
607 PR middle-end/61848
608 * c-decl.c (merge_decls): Don't merge section name or tls model
609 to newdecl symtab node, instead merge to olddecl. Override
610 existing olddecl section name. Set tls_model for all thread-local
611 vars, not just OMP thread-private ones. Remove incorrect comment.
612
83685514
AM
6132014-10-16 Andrew MacLeod <amacleod@redhat.com>
614
615 * c-decl.c: Adjust include files.
616
78a7c317
DD
6172014-10-14 DJ Delorie <dj@redhat.com>
618
619 * c-parser.c (c_parse_init): Add RID entries for each __intN.
620 (c_token_starts_typename): Check all __intN, not just __int128.
621 (c_token_starts_declspecs): Likewise.
622 (c_parser_declspecs): Likewise.
623 (c_parser_attribute_any_word): Likewise.
624 (c_parser_objc_selector): Likewise.
625 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
626 (struct c_declspecs): Add int_n_idx field to record *which* __intN
627 is specified.
628 * c-decl.c (declspecs_add_type): Check for all __intN, not just
629 __int128.
630 (finish_declspecs): Likewise.
631
74d98c1e
AB
6322014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
633
634 * c-parser.c (c_parser_all_labels): New function to replace
635 the duplicate code.
636 (c_parser_statement): Call the new function.
637
84937de2
MP
6382014-10-09 Marek Polacek <polacek@redhat.com>
639
640 PR c/63480
641 * c-typeck.c (pop_init_level): Don't warn about initializing
642 with { }.
643
0382aaa0
MP
6442014-10-07 Marek Polacek <polacek@redhat.com>
645
646 PR c/59717
647 * c-decl.c (header_for_builtin_fn): New function.
648 (implicitly_declare): Suggest which header to include.
649
7a0ca710
MP
6502014-10-07 Marek Polacek <polacek@redhat.com>
651
652 * c-convert.c (convert): Use error_operand_p.
653 * c-typeck.c (require_complete_type): Likewise.
654 (really_atomic_lvalue): Likewise.
655 (digest_init): Likewise.
656 (handle_omp_array_sections_1): Likewise.
657
6bc8a126
MP
6582014-10-03 Marek Polacek <polacek@redhat.com>
659
660 PR c/63453
661 * c-decl.c (pop_scope): Don't warn about "inline function declared
662 but never defined" for functions marked with gnu_inline attribute.
663
d90c0a59
JJ
6642014-09-25 Jakub Jelinek <jakub@redhat.com>
665
666 PR c++/63249
667 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
668 on low_bound and length.
669
083e891e
MP
6702014-09-24 Marek Polacek <polacek@redhat.com>
671
672 PR c/61405
673 PR c/53874
674 * c-parser.c: Don't define CPP_KEYWORD.
675 (c_parser_switch_statement): Pass original type to c_finish_case.
676 * c-tree.h (c_finish_case): Update declaration.
677 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
678 conditionally to c_do_switch_warnings.
679
8d95fe25
MP
6802014-09-03 Marek Polacek <polacek@redhat.com>
681
682 PR c/62024
683 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
684 conversions.
685
9a771876
JJ
6862014-09-02 Jakub Jelinek <jakub@redhat.com>
687 Balaji V. Iyer <balaji.v.iyer@intel.com>
688 Igor Zamyatin <igor.zamyatin@intel.com>
689
690 * c-parser.c (c_parser_cilk_for): New function.
691 (c_parser_cilk_grainsize): Likewise.
692 (c_get_temp_regvar): Likewise.
693 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
694 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
695 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
696 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
697 case.
698
b7679d96
CG
6992014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
700
701 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
702 with using HOST_WIDE_INT without truncation to 'int'
703
59ea0364
MP
7042014-08-22 Marek Polacek <polacek@redhat.com>
705
706 PR c++/62199
707 * c-typeck.c (parser_build_binary_op): Adjust call to
708 warn_logical_not_parentheses.
709
671a475e
IZ
7102014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
711
712 PR other/62008
713 * c-parser.c (c_parser_array_notation): Check for correct
714 type of an array added.
715
04159acf
MP
7162014-08-19 Marek Polacek <polacek@redhat.com>
717
718 PR c++/62153
719 * c-typeck.c (build_binary_op): If either operand of a comparison
720 is a boolean expression, call maybe_warn_bool_compare.
721
c77935ee
PP
7222014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
723
724 PR c/45584
725 * c-typeck.c (build_c_cast): Do a conversion even when the
726 TYPE_MAIN_VARIANTs are the same.
727
35aff4fb
MP
7282014-08-19 Marek Polacek <polacek@redhat.com>
729
730 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
731 pedwarn_c99 instead of pedwarn.
732 (grokfield): Likewise.
733 (warn_defaults_to): New function.
734 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
735 Unconditionally call pedwarn_c99 instead of pedwarn.
736 (start_function): Call warn_defaults_to instead of pedwarn_c99.
737 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
738 check flag_isoc11 before.
739 * c-errors.c (pedwarn_c99): Change the return type to bool.
740 Handle -Wc99-c11-compat.
741 * c-parser.c (disable_extension_diagnostics): Handle
742 warn_c99_c11_compat.
743 (restore_extension_diagnostics): Likewise.
744 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
745 instead of pedwarn, don't check flag_isoc11 before.
746 (c_parser_declspecs): Likewise.
747 (c_parser_alignas_specifier): Likewise.
748 (c_parser_alignof_expression): Likewise.
749 (c_parser_generic_selection): Likewise.
750 * c-tree.h (pedwarn_c99): Update declaration.
751 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
752 of pedwarn_c99.
753
177cce46
MP
7542014-08-19 Marek Polacek <polacek@redhat.com>
755
756 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
757 to pedwarn_c90.
758 * c-errors.c: Include "opts.h".
759 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
760 * c-parser.c (disable_extension_diagnostics): Handle negative value
761 of warn_c90_c99_compat, too.
762 (restore_extension_diagnostics): Likewise.
763 (c_parser_compound_statement_nostart): Pass
764 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
765
6dc99c33
MP
7662014-08-12 Marek Polacek <polacek@redhat.com>
767
768 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
769 Add pedwarn.
770 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
771 Likewise.
772 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
773
f3bede71
MP
7742014-08-10 Marek Polacek <polacek@redhat.com>
775
776 PR c/51849
777 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
778 Call pedwarn_c90 instead of pedwarn.
779 (check_bitfield_type_and_width): Likewise.
780 (declspecs_add_qual): Likewise.
781 (declspecs_add_type): Likewise.
782 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
783 Adjust to only call pedwarn_c90.
784 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
785 pedwarn_c90 instead of pedwarn.
786 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
787 * c-parser.c (disable_extension_diagnostics): Handle
788 warn_c90_c99_compat.
789 (restore_extension_diagnostics): Likewise.
790 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
791 pedwarn_c90 instead of pedwarn.
792 (c_parser_initelt): Likewise.
793 (c_parser_postfix_expression): Likewise.
794 (c_parser_postfix_expression_after_paren_type): Likewise.
795 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
796 * c-tree.h: Fix formatting.
797 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
798 pedwarn_c90 instead of pedwarn.
799
9f25a338
TS
8002014-08-07 Trevor Saunders <tsaunders@mozilla.com>
801
802 * c-typeck.c: Remove include of pointer-set.h.
803
044331a8
MP
8042014-08-07 Marek Polacek <polacek@redhat.com>
805
806 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
807
b787e7a2
TS
8082014-08-02 Trevor Saunders <tsaunders@mozilla.com>
809
810 * c-typeck.c: Use hash_map instead of pointer_map.
811
6e2830c3
TS
8122014-08-02 Trevor Saunders <tsaunders@mozilla.com>
813
814 * c-decl.c: Use hash_set instead of pointer_set.
815
a7ee52fb
IZ
8162014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
817
818 PR middle-end/61455
819 * c-array-notation.c (expand_array_notations): Handling
820 of DECL_EXPR added.
821
b4dfdc11
MG
8222014-07-31 Marc Glisse <marc.glisse@inria.fr>
823
824 PR c++/60517
825 * c-typeck.c (c_finish_return): Return 0 instead of the address of
826 a local variable.
827
976d5a22
TT
8282014-07-30 Tom Tromey <tromey@redhat.com>
829
830 * c-typeck.c (struct constructor_stack) <designator_depth>: New
831 field.
832 (really_start_incremental_init, push_init_level): Initialize
833 designator_depth.
834 (pop_init_level): Set global designator_depth.
835 (process_init_element): Check for designated_init attribute.
836
30281de2
MP
8372014-07-20 Marek Polacek <polacek@redhat.com>
838
839 PR c/61852
840 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
841 (implicitly_declare): Pass location to implicit_decl_warning.
842
b108f48f
JJ
8432014-07-14 Jakub Jelinek <jakub@redhat.com>
844
845 PR middle-end/61294
846 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
847 If non-NULL, call c_parser_check_literal_zero.
848 (c_parser_check_literal_zero): New function.
849 (c_parser_postfix_expression_after_primary): Adjust
850 c_parser_expr_list caller, handle -Wmemset-transposed-args.
851
773ec47f
MP
8522014-07-06 Marek Polacek <polacek@redhat.com>
853
854 PR c/6940
855 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
856 * c-tree.h (C_ARRAY_PARAMETER): Define.
857 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
858 function parameter.
859
22e1cf1c
JH
8602014-07-02 Jan Hubicka <hubicka@ucw.cz>
861 Chen Gang <gang.chen.5i5j@gmail.com>
862
863 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
864 releasing symbol.
865
52ec0ea3
MP
8662014-07-01 Marek Polacek <polacek@redhat.com>
867
868 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
869 instead of 0 to WARN_FOR_ASSIGNMENT.
870
d5c3d343
MP
8712014-07-01 Marek Polacek <polacek@redhat.com>
872
873 PR c/58286
874 * c-typeck.c (convert_for_assignment): Pass
875 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
876
6a7253a4
MP
8772014-06-30 Marek Polacek <polacek@redhat.com>
878
879 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
880 has no_sanitize_undefined attribute.
881
5e88a8f4
IZ
8822014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
883
884 PR middle-end/57541
885 * c-array-notation.c (fix_builtin_array_notation_fn):
886 Check for 0 arguments in builtin call. Check that bultin argument is
887 correct.
888 * c-parser.c (c_parser_array_notation): Check for incorrect initial
889 index.
890
9698b078
SH
8912014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
892
893 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
894 qualifiers in __auto_type for atomic types.
895 (c_parser_typeof_specifier): Discard all type qualifiers in
896 __typeof__ for atomic types.
897
6e07c515
MP
8982014-06-25 Marek Polacek <polacek@redhat.com>
899
900 PR c/61162
901 * c-parser.c (c_parser_statement_after_labels): Pass the location of
902 the return expression to c_finish_return.
903
da6f124d
JJ
9042014-06-25 Jakub Jelinek <jakub@redhat.com>
905
906 * c-typeck.c (c_finish_omp_clauses): Make sure
907 OMP_CLAUSE_LINEAR_STEP has correct type.
908
c203e8a7
TS
9092014-06-24 Trevor Saunders <tsaunders@mozilla.com>
910
911 * c-decl.c: Adjust.
912
56ad0e38
JJ
9132014-06-24 Jakub Jelinek <jakub@redhat.com>
914
915 * c-parser.c (c_parser_omp_for_loop): For
916 #pragma omp parallel for simd move lastprivate clause from parallel
917 to for rather than simd.
918
47c2554f
MP
9192014-06-23 Marek Polacek <polacek@redhat.com>
920
921 * c-typeck.c (parser_build_binary_op): Don't call
922 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
923
56363ffd
JH
9242014-06-15 Jan Hubicka <hubicka@ucw.cz>
925
926 * c-parser.c (c_parser_omp_threadprivate): Likewise.
927 * c-decl.c (merge_decls): Likewise.
928
d7ff7ae5
MP
9292014-06-09 Marek Polacek <polacek@redhat.com>
930
931 PR c/36446
932 * c-typeck.c (error_init): Call inform instead of error_at.
933 (pedwarn_init): Call inform instead of pedwarn.
934 (warning_init): Call inform instead of warning_at.
935
24d047a3
JH
9362014-06-07 Jan Hubicka <hubicka@ucw.cz>
937
938 * c-decl.c (merge_decls): Use set_decl_section_name.
939 (duplicate_decls): Remove node if it exists.
940
9bac5cbb
G
9412014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
942
943 PR c/53119
944 * c-typeck.c (push_init_level, process_init_element,
945 pop_init_level): Correct check for zero initialization, move
946 missing brace warning to respect zero initialization.
947
8ffcdea8
MP
9482014-06-05 Marek Polacek <polacek@redhat.com>
949
950 PR c/56724
951 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
952
742938c9
MP
9532014-06-05 Marek Polacek <polacek@redhat.com>
954
955 PR c/49706
956 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
957 on the left hand side operand of a comparison.
958
6447c55d
MP
9592014-06-05 Marek Polacek <polacek@redhat.com>
960
961 PR c/48062
962 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
963 Print note only if the warning was printed.
964
9dc7743c
IZ
9652014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
966
967 PR c/58942
968 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
969 with a pointer.
970
fedfecef
MP
9712014-06-03 Marek Polacek <polacek@redhat.com>
972
973 PR c/60439
974 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
975 c_start_case.
976 * c-tree.h (c_start_case): Update.
977 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
978 switch condition has boolean value.
979
9b2b7279
AM
9802014-06-02 Andrew MacLeod <amacleod@redhat.com>
981
982 * c-decl.c: Include builtins.h.
983 * c-parser.c: Likewise.
984
5c1bc275
MP
9852014-05-27 Marek Polacek <polacek@redhat.com>
986
987 PR c/56724
988 * c-typeck.c (convert_arguments): Get location of a parameter. Change
989 error and warning calls to error_at and warning_at. Pass location of
990 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
991 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
992 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
993
97563bc8
IZ
9942014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
995
996 PR c/61191
997 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
998 function parameters.
999
aede2c10
JH
10002014-05-23 Jan Hubicka <hubicka@ucw.cz>
1001
1002 * c-decl.c (merge_decls): Preserve symtab node pointers.
1003 (duplicate_decls): Free new decl.
1004
edbba2ce
TS
10052014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1006
f3316c6d
TS
1007 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1008 initialization.
1009
edbba2ce
TS
1010 * c-parser.c (c_parser_omp_target): Return bool values.
1011
68c81f24
TS
10122014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1013
1014 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1015 num_teams_loc variable to num_thread_limit_loc.
1016
632f2871
RS
10172014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1018
1019 * c-array-notation.c (expand_array_notations): Use void_node
1020 instead of void_zero_node.
1021
766090c2
TS
10222014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1023
1024 * c-decl.c (finish_struct): Adjust.
1025 (finish_enum): Likewise.
1026 (bind): Adjust.
1027 (record_inline_static): Likewise.
1028 (push_scope): Likewise.
1029 (make_label): Likewise.
1030 (lookup_label_for_goto): Likewise.
1031 (finish_struct): Likewise.
1032 (finish_enum): Likewise.
1033 (store_parm_decls): Likewise.
1034 (c_push_function_context): Likewise.
1035 * c-lang.h: Remove usage of variable_size gty attribute.
1036 * c-parser.c (c_parse_init): Adjust.
1037 (c_parse_file): Likewise.
1038
2b107f6b
MP
10392014-05-13 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/61162
1042 * c-typeck.c (convert_for_assignment): Pass location to
1043 WARN_FOR_ASSIGNMENT instead of input_location.
1044
d033409e
MP
10452014-05-10 Marek Polacek <polacek@redhat.com>
1046
1047 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1048 maybe_warn_string_init.
1049 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1050 maybe_warn_string_init.
1051 * c-tree.h (maybe_warn_string_init): Update declaration.
1052 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1053 Call pedwarn_init with loc instead of with input_location.
1054 (digest_init): Pass init_loc to maybe_warn_string_init.
1055 (pop_init_level): Call pedwarn_init with loc instead of with
1056 input_location.
1057 (set_init_index): Likewise.
1058 (process_init_element): Likewise.
1059
ea58ef42
MP
10602014-05-09 Marek Polacek <polacek@redhat.com>
1061
1062 PR c/61096
1063 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1064 (c_parser_initelt): Pass location to set_init_label. Pass array index
1065 location to set_init_index.
1066 * c-tree.h (push_init_level): Update declaration.
1067 (pop_init_level): Likewise.
1068 (set_init_index): Likewise.
1069 (set_init_label): Likewise.
1070 * c-typeck.c (error_init): Add location parameter. Call error_at
1071 instead of error.
1072 (digest_init): Pass init_loc to error_init.
1073 (really_start_incremental_init):
1074 (push_init_level): Add location parameter. Pass loc to pop_init_level
1075 and error_init.
1076 (pop_init_level): Likewise.
1077 (set_designator): Add location parameter. Pass loc to pop_init_level,
1078 push_init_level, and error_init.
1079 (set_init_index): Add location parameter. Pass loc to error_init and
1080 set_designator.
1081 (set_init_label): Likewise.
1082 (output_init_element): Pass loc to error_init.
1083 (process_init_element): Pass loc to error_init, pop_init_level,
1084 pedwarn_init, and push_init_level.
1085
661a0813
MP
10862014-05-09 Marek Polacek <polacek@redhat.com>
1087
1088 PR c/50459
1089 * c-parser.c (c_parser_attributes): Parse the arguments as an
1090 expression-list if the attribute takes identifier.
1091
2793eeab
MP
10922014-05-08 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/61053
1095 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1096 TYPE_ALIGN_UNIT.
1097
f827930a
MP
10982014-05-08 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/61077
1101 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1102 of main.
1103
1d60af08
KZ
11042014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1105 Mike Stump <mikestump@comcast.net>
1106 Richard Sandiford <rdsandiford@googlemail.com>
1107
1108 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1109 (finish_enum): Use wide-int interfaces.
1110 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1111 * c-typeck.c (build_c_cast): Likewise.
1112 (set_nonincremental_init_from_string): Likewise.
1113 (c_tree_equal): Likewise.
1114
a0e24419
MP
11152014-05-02 Marek Polacek <polacek@redhat.com>
1116
1117 PR c/25801
1118 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1119 Return size_one_node when the type is not complete.
1120 (pointer_diff): Remove comment.
1121 (build_unary_op): Improve error messages.
1122
19fc9faa
MP
11232014-05-02 Marek Polacek <polacek@redhat.com>
1124
1125 * c-typeck.c (c_finish_return): Separate warning_at calls.
1126
63bc4e87
MP
11272014-05-02 Marek Polacek <polacek@redhat.com>
1128
1129 * c-tree.h (error_init): Remove declaration.
1130 (pedwarn_init): Likewise.
1131 * c-typeck.c (error_init): Make static and move above.
1132 (pedwarn_init): Likewise.
1133 (warning_init): Move above.
1134 (maybe_warn_string_init): Likewise.
1135
4bd2511b
JL
11362014-05-01 Jeff Law <law@redhat.com>
1137
1138 Revert:
1139
1140 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1141 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1142 avoid goto.
1143
6a358dcb
MP
11442014-05-02 Marek Polacek <polacek@redhat.com>
1145
1146 PR c/60784
1147 * c-typeck.c (push_init_level): Set constructor_designated to
1148 p->designated for structures.
1149
ae5ebda4
MP
11502014-05-01 Marek Polacek <polacek@redhat.com>
1151
1152 PR c/60915
1153 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1154 function-definition has an attribute after the declarator.
1155
96b40f8d
MP
11562014-05-01 Marek Polacek <polacek@redhat.com>
1157
1158 PR c/60257
1159 * c-typeck.c (warning_init): Add location_t parameter. Call
1160 warning_at instead of warning.
1161 (push_init_level): Pass input_location to warning_init.
1162 (add_pending_init): Add location_t parameter. Pass loc to
1163 warning_init.
1164 (set_nonincremental_init): Pass input_location to add_pending_init.
1165 (set_nonincremental_init_from_string): Likewise.
1166 (output_init_element): Pass loc to warning_init and to
1167 add_pending_init.
1168
32e00768
MP
11692014-05-01 Marek Polacek <polacek@redhat.com>
1170
1171 PR c/43395
1172 * c-typeck.c (c_finish_return): Distinguish between label and variable
1173 when warning about returning local address.
1174
c9379ce2
MP
11752014-05-01 Marek Polacek <polacek@redhat.com>
1176
1177 PR c/29467
1178 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1179 in C89 mode.
1180
d00887e8
MP
11812014-05-01 Marek Polacek <polacek@redhat.com>
1182
1183 PR c/43245
1184 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1185 instead of 0 to WARN_FOR_QUALIFIERS.
1186
5436fa2e
MP
11872014-05-01 Marek Polacek <polacek@redhat.com>
1188
1189 PR c/56989
1190 * c-typeck.c (default_conversion): Use better location for
1191 error call.
1192
f8ed5150
MP
11932014-04-30 Marek Polacek <polacek@redhat.com>
1194
1195 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1196 also when SANITIZE_FLOAT_DIVIDE is on.
1197
8337d1db
MP
11982014-04-30 Marek Polacek <polacek@redhat.com>
1199
1200 PR c/60139
1201 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1202 and pedwarn_init. Use loc insted of input_location.
1203
c4bdc42f
MP
12042014-04-30 Marek Polacek <polacek@redhat.com>
1205
1206 PR c/60351
1207 * c-typeck.c (build_binary_op): Use location when warning about
1208 shift count.
1209
45484dcf
MP
12102014-04-25 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/18079
1213 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1214 always_inline/noinline and hot/cold attributes.
1215
34cf811f
MP
12162014-04-25 Marek Polacek <polacek@redhat.com>
1217
1218 PR c/60114
1219 * c-parser.c (c_parser_initelt): Pass input_location to
1220 process_init_element.
1221 (c_parser_initval): Pass loc to process_init_element.
1222 * c-tree.h (process_init_element): Adjust declaration.
1223 * c-typeck.c (push_init_level): Pass input_location to
1224 process_init_element.
1225 (pop_init_level): Likewise.
1226 (set_designator): Likewise.
1227 (output_init_element): Add location_t parameter. Pass loc to
1228 digest_init.
1229 (output_pending_init_elements): Pass input_location to
1230 output_init_element.
1231 (process_init_element): Add location_t parameter. Pass loc to
1232 output_init_element.
1233
42056eac
JJ
12342014-04-24 Jakub Jelinek <jakub@redhat.com>
1235
1236 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1237 atomic-clause, allow comma in between atomic-clause and
1238 seq_cst.
1239
e162a134
JJ
12402014-04-22 Jakub Jelinek <jakub@redhat.com>
1241
1242 PR c/59073
1243 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1244 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1245
2f6babac
IZ
12462014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1247
1248 PR middle-end/60469
1249 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1250 create_tmp_var instead build_decl for creating temps.
1251 (build_array_notation_expr): Likewise.
1252 (fix_conditional_array_notations_1): Likewise.
1253 (fix_array_notation_expr): Likewise.
1254 (fix_array_notation_call_expr): Likewise.
1255
8edbfaa6
JJ
12562014-03-28 Jakub Jelinek <jakub@redhat.com>
1257
1258 PR c++/60689
1259 * c-tree.h (c_build_function_call_vec): New prototype.
1260 * c-typeck.c (build_function_call_vec): Don't call
1261 resolve_overloaded_builtin here.
1262 (c_build_function_call_vec): New wrapper function around
1263 build_function_call_vec. Call resolve_overloaded_builtin here.
1264 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1265 Call c_build_function_call_vec instead of build_function_call_vec.
1266 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1267 * c-decl.c (finish_decl): Likewise.
1268
7485aeea
MLI
12692014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1270
1271 PR c/55383
1272 * c-typeck.c: Use correct format string in cast-qual warning
1273
b17a8b07
TS
12742014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1275
1276 * c-decl.c (c_decl_attributes): Use
1277 lang_hooks.types.omp_mappable_type.
1278 * c-typeck.c (c_finish_omp_clauses): Likewise.
1279
3af9c5e9
MP
12802014-03-06 Marek Polacek <polacek@redhat.com>
1281
1282 PR c/60197
1283 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1284 of checking tree code.
1285
1c9f5f33
PK
12862014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1287
1288 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1289 (c_parser_parameter_declaration): Likewise.
1290
cc28fc7f
MP
12912014-02-19 Marek Polacek <polacek@redhat.com>
1292
1293 PR c/60195
1294 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1295 Call mark_exp_read on exp.value.
1296 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1297 TREE_ADDRESSABLE on old instead of val.
1298 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1299
b581c05c
PK
13002014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1301
1302 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1303 C_EXPR_APPEND by vec_safe_push.
1304 * c-tree.h (C_EXPR_APPEND): Remove.
1305
81e5eca8
MP
13062014-01-31 Marek Polacek <polacek@redhat.com>
1307
1308 PR c/59963
1309 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1310 build_function_call_vec.
1311 (build_function_call): Likewise.
1312 (build_atomic_assign): Likewise.
1313 (build_function_call_vec): Add arg_loc parameter. Use it.
1314 (convert_arguments): Likewise.
1315 (convert_for_assignment): Rename rhs_loc to expr_loc.
1316 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1317 (c_parser_objc_keywordexpr): Likewise.
1318 (c_parser_postfix_expression_after_primary): Call
1319 build_function_call_vec with expr_loc rather than op_loc.
1320 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1321 build_function_call_vec.
1322 (c_parser_expr_list): Add locations parameter. Fill it with locations
1323 of function arguments.
1324 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1325
68fca595
MP
13262014-01-30 Marek Polacek <polacek@redhat.com>
1327
1328 PR c/59940
1329 * c-typeck.c (build_function_call_vec): Use loc parameter.
1330 (convert_arguments): Add location parameter. Use it.
1331 (ep_convert_and_check): Likewise.
1332 (build_atomic_assign): Adjust convert_for_assignment call.
1333 (build_modify_expr): Likewise.
1334 (digest_init): Likewise.
1335 (c_finish_return): Likewise.
1336 (build_conditional_expr): Adjust ep_convert_and_check calls.
1337 (convert_for_assignment): Add rhs_loc parameter. Use it.
1338 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1339 calls.
1340
fa337f3a
RB
13412014-01-30 Richard Biener <rguenther@suse.de>
1342
1343 PR c/59905
1344 * c-typeck.c (build_function_call_vec): Do not replace calls
1345 to a function via an incompatible type with a runtime abort.
1346
b72271b9
BI
13472014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1348
1349 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1350 flag_enable_cilkplus with flag_cilkplus.
1351 (c_parser_direct_declarator_inner): Likewise.
1352 (c_parser_attribute_any_word): Likewise.
1353 (c_parser_attributes): Likewise.
1354 (c_parser_compound_statement): Likewise.
1355 (c_parser_statement_after_labels): Likewise.
1356 (c_parser_if_statement): Likewise.
1357 (c_parser_switch_statement): Likewise.
1358 (c_parser_do_statement): Likewise.
1359 (c_parser_for_statement): Likewise.
1360 (c_parser_unary_expression): Likewise.
1361 (c_parser_postfix_expression): Likewise.
1362 (c_parser_postfix_expression_after_primary): Likewise.
1363 (c_parser_postfix_expression_after_primary): Likewise.
1364 (c_parser_omp_clause_name): Likewise.
1365 (c_finish_omp_declare_simd): Likewise.
1366 (c_parser_cilk_verify_simd): Likewise.
1367 * c-typeck.c (build_array_ref): Likewise.
1368 (build_function_call_vec): Likewise.
1369 (convert_arguments): Likewise.
1370 (build_compound_expr): Likewise.
1371 (c_finish_return): Likewise.
1372 (c_finish_if_stmt): Likewise.
1373 (c_finish_loop): Likewise.
1374 (build_binary_op): Likewise.
1375
393e8e8b
MP
13762014-01-23 Marek Polacek <polacek@redhat.com>
1377
1378 PR c/59846
1379 * c-typeck.c (parser_build_binary_op): Use location instead of
1380 input_location.
1381 (build_binary_op): Pass location to shorten_compare.
1382
f04dda30
MP
13832014-01-23 Marek Polacek <polacek@redhat.com>
1384
1385 PR c/58346
1386 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1387 an empty aggregate.
1388
789eadcd
MP
13892014-01-23 Marek Polacek <polacek@redhat.com>
1390
1391 PR c/59871
1392 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1393 of a comma expression.
1394 (emit_side_effect_warnings): Likewise.
1395
40f14e9f
BI
13962014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1397
1398 PR c/59825
1399 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1400 function to use walk_tree and moved a lot of its functionality to
1401 expand_array_notations.
1402 (expand_array_notations): New function.
1403
74558dd9
BI
14042014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1405
1406 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1407 attribute an attribute without value.
1408
652fea39
JJ
14092014-01-23 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR middle-end/58809
1412 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1413 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1414
f34f1c87
MP
14152014-01-22 Marek Polacek <polacek@redhat.com>
1416
1417 PR c/59891
1418 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1419 of remove_c_maybe_const_expr on op1 and op2.
1420
241f845a
JJ
14212014-01-15 Jakub Jelinek <jakub@redhat.com>
1422
1423 PR c/58943
1424 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1425 effects, preevaluate rhs using SAVE_EXPR first.
1426
9a74f20c
BI
14272014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1428
1429 PR c++/59631
1430 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1431 statements with if-elseif statements.
1432
96066ce1
MP
14332014-01-06 Marek Polacek <polacek@redhat.com>
1434
1435 PR c/57773
1436 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1437 defined bit-field types only in ISO C.
1438
23a5b65a
RS
14392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1440
1441 Update copyright years
1442
f9030485
RS
14432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1444
1445 * c-array-notation.c: Use the standard form for the copyright notice.
1446
41958c28
BI
14472013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1448
1449 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1450 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1451 field in parser is not empty. If not-empty, call the function
1452 c_parser_finish_omp_declare_simd.
1453 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1454 between SIMD-enabled functions and #pragma simd. Added new parameter.
1455 (c_parser_cilk_all_clauses): Modified the usage of the function
1456 c_parser_cilk_clause_vectorlength as mentioned above.
1457 (c_parser_cilk_simd_fn_vector_attrs): New function.
1458 (c_finish_cilk_simd_fn_tokens): Likewise.
1459 (is_cilkplus_vector_p): Likewise.
1460 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1461 "nomask," and "mask" strings in clause name.
1462 (c_parser_omp_all_clauses): Added 3 new case statements:
1463 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1464 PRAGMA_CILK_CLAUSE_NOMASK.
1465 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1466 check for vector attribute and if so call the function
1467 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1468 called the function c_finish_cilk_simd_fn_tokens.
1469 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1470 parser field is non-empty. If so, parse them as you would parse
1471 the omp declare simd pragma.
1472 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1473 Added a check when step is a parameter and flag it as error.
1474 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1475 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1476 pragma_omp_clause.
1477
cef0fd0e
TS
14782013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1479
1480 * c-parser.c (c_parser_omp_parallel): Fix description.
1481
12893402
BI
14822013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1483
1484 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1485 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1486 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1487 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1488
296674db
JM
14892013-12-04 Joseph Myers <joseph@codesourcery.com>
1490
1491 PR c/52023
1492 * c-parser.c (c_parser_alignas_specifier): Use
1493 c_sizeof_or_alignof_type instead of c_alignof.
1494 (c_parser_alignof_expression): Likewise, with min_alignof
1495 parameter depending on alignof spelling used.
1496
edd28054
MP
14972013-12-04 Marek Polacek <polacek@redhat.com>
1498
1499 PR c/54113
1500 * c-decl.c (start_function): Don't warn for missing prototype for
1501 inline functions.
1502
da0fc454
MP
15032013-12-03 Marek Polacek <polacek@redhat.com>
1504
1505 PR c/59351
1506 * c-decl.c (build_compound_literal): Allow compound literals with
1507 empty initial value.
1508
4c2ecab0
JM
15092013-12-02 Joseph Myers <joseph@codesourcery.com>
1510
1511 PR c/58235
1512 * c-typeck.c (build_modify_expr): Diagnose assignment to
1513 expression with array type.
1514
340baef7
JM
15152013-11-29 Joseph Myers <joseph@codesourcery.com>
1516
1517 PR c/42262
1518 * c-typeck.c (process_init_element): Do not treat a string as
1519 initializing a whole array when used with a designator for an
1520 individual element.
1521
6763b9f7
JM
15222013-11-29 Joseph Myers <joseph@codesourcery.com>
1523
1524 PR c/57574
1525 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1526 an inline function following a static declaration.
1527
e7bd1de1
JJ
15282013-11-28 Jakub Jelinek <jakub@redhat.com>
1529
1530 PR c/59310
1531 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1532 to p_name before calling c_parser_omp_teams instead of after.
1533 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1534 argument. Remove unused p_name variable.
1535
0136f8f0
AH
15362013-11-27 Aldy Hernandez <aldyh@redhat.com>
1537 Jakub Jelinek <jakub@redhat.com>
1538
1539 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1540 external_scope is NULL.
1541
241b71bb
TV
15422013-11-27 Tom de Vries <tom@codesourcery.com>
1543 Marc Glisse <marc.glisse@inria.fr>
1544
1545 PR c++/59032
1546 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1547
2fb9a547
AM
15482013-11-22 Andrew MacLeod <amacleod@redhat.com>
1549
1550 * c-typeck.c: Add required include files from gimple.h.
1551
8400e75e
DM
15522013-11-22 David Malcolm <dmalcolm@redhat.com>
1553
1554 * c-decl.c (define_label, shadow_tag_warned)
1555 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1556 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1557 (declspecs_add_type): Remove use of in_system_header macro.
1558 * c-parser.c (c_parser_unary_expression): Likewise.
1559 * c-typeck.c (store_init_value, process_init_element)
1560 (c_start_case): Likewise.
1561
1562 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1563 macro.
1564
1565 * c-parser.c (c_parser_set_source_position_from_token): Remove
1566 reference to in_system_header from comment.
1567
386b1f1f
RS
15682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1569
1570 * c-decl.c (grokdeclarator): Update comment to refer to
1571 tree_to_[su]hwi rather than tree_low_cst.
1572
ae7e9ddd
RS
15732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1574
1575 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1576 tree_to_uhwi throughout.
1577
9439e9a1
RS
15782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1579
1580 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1581 throughout.
1582
9541ffee
RS
15832013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1584
1585 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1586 throughout.
1587
c02065fc
AH
15882013-11-15 Aldy Hernandez <aldyh@redhat.com>
1589
1590 * c-parser.c (c_parser_cilk_simd): New.
1591 (c_parser_cilk_verify_simd): New.
1592 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1593 (c_parser_omp_for_loop): Add case for NE_EXPR.
1594 Set c_break_label for CILK_SIMD.
1595 (c_parser_cilk_clause_vectorlength): New.
1596 (c_parser_cilk_clause_linear): New.
1597 (c_parser_cilk_clause_name): New.
1598 (c_parser_cilk_all_clauses): New.
1599 * c-typeck.c (build_unary_op): Pass location argument to
1600 readonly_error.
1601 (build_modify_expr): Same.
1602 (build_asm_expr): Same.
1603 (c_finish_bc_stmt): Error on break/continue in loops.
1604
18f429e2
AM
16052013-11-14 Andrew MacLeod <amacleod@redhat.com>
1606
1607 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1608
d8a2d370
DN
16092013-11-14 Diego Novillo <dnovillo@google.com>
1610
1611 * c-decl.c: Include print-tree.h.
1612 Include stor-layout.h.
1613 Include varasm.h.
1614 Include attribs.h.
1615 Include stringpool.h.
1616 * c-lang.c: Include fold-const.h.
1617 * c-parser.c: Include stringpool.h.
1618 Include attribs.h.
1619 Include stor-layout.h.
1620 Include varasm.h.
1621 Include trans-mem.h.
1622 * c-typeck.c: Include stor-layout.h.
1623 Include trans-mem.h.
1624 Include varasm.h.
1625 Include stmt.h.
1626
38b7bc7f
JM
16272013-11-13 Joseph Myers <joseph@codesourcery.com>
1628
1629 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1630 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1631 __auto_type.
1632 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1633 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1634 RID_AUTO_TYPE.
1635 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1636 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1637 (c_parser_declarator, c_parser_direct_declarator_inner)
1638 (c_parser_parameter_declaration, c_parser_type_name): All callers
1639 changed.
1640 (c_parser_declaration_or_fndef): Handle declarations with type
1641 determined from the initializer.
1642
45b0be94
AM
16432013-11-12 Andrew MacLeod <amacleod@redhat.com>
1644
18f429e2 1645 * c-typeck.c: Include gimplify.h.
45b0be94 1646
582d9b50
JM
16472013-11-12 Joseph Myers <joseph@codesourcery.com>
1648
1649 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1650 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1651 comment.
1652 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1653 or _Thread_local as appropriate in diagnostics.
1654 (build_null_declspecs): Initialize ret->thread_gnu_p.
1655 (declspecs_add_scspec): Handle either __thread or _Thread_local
1656 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1657 pedantic. Do not disallow _Thread_local extern and _Thread_local
1658 static.
1659
267bac10
JM
16602013-11-07 Joseph Myers <joseph@codesourcery.com>
1661 Andrew MacLeod <amacleod@redhat.com>
1662
1663 * c-aux-info.c (gen_type): Handle atomic qualifier.
1664 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1665 qualifiers when compating types.
1666 (shadow_tag_warned): Handle atomic_p in declspecs.
1667 (quals_from_declspecs): Likewise.
1668 (start_decl): Use c_type_promotes_to when promoting argument
1669 types.
1670 (grokdeclarator): Handle _Atomic.
1671 (get_parm_info): Diagnose any qualifier on "void" as only
1672 parameter.
1673 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1674 comparing types. Use c_type_promotes_to when promoting argument
1675 types.
1676 (finish_function): Use c_type_promotes_to when promoting argument
1677 types.
1678 (build_null_declspecs): Handle atomic_p in declspecs.
1679 (declspecs_add_qual): Handle RID_ATOMIC.
1680 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1681 (c_token_starts_declspecs): Handle RID_ATOMIC.
1682 (c_parser_declspecs): Handle atomic type specifiers and
1683 qualifiers.
1684 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1685 from types of expressions with atomic type.
1686 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1687 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1688 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1689 (c_parser_statement_after_labels, c_parser_switch_statement)
1690 (c_parser_for_statement, c_parser_expr_no_commas)
1691 (c_parser_conditional_expression, c_parser_binary_expression)
1692 (c_parser_cast_expression, c_parser_unary_expression)
1693 (c_parser_postfix_expression)
1694 (c_parser_postfix_expression_after_primary, c_parser_expression):
1695 Use convert_lvalue_to_rvalue.
1696 (c_parser_expression_conv, c_parser_expr_list): Document
1697 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1698 (c_parser_objc_synchronized_statement): Use
1699 convert_lvalue_to_rvalue.
1700 (c_parser_objc_selector): Handle RID_ATOMIC.
1701 (c_parser_objc_receiver, c_parser_array_notation): Use
1702 convert_lvalue_to_rvalue.
1703 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1704 _Atomic (type-name).
1705 (struct c_declspecs): Add atomic_p field.
1706 (convert_lvalue_to_rvalue): Declare.
1707 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1708 corresponding atomic types.
1709 (qualify_type): Don't add _Atomic qualifiers from second argument.
1710 (comp_target_types): Do not allow _Atomic mismatches.
1711 (type_lists_compatible_p): Do not remove atomic qualifiers when
1712 comparing types.
1713 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1714 (build_atomic_assign): New functions.
1715 (build_unary_op): Use build_atomic_assign for atomic increment and
1716 decrement.
1717 (build_conditional_expr): Do not treat _Atomic void as a qualified
1718 version of void.
1719 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1720 (find_anonymous_field_with_type, convert_to_anonymous_field)
1721 (convert_for_assignment): Do not remove atomic qualifiers when
1722 comparing types.
1723 (digest_init): Do not accept initialization of arrays of atomic
1724 elements by string constants.
1725 (build_asm_expr): Use convert_lvalue_to_rvalue.
1726 (build_binary_op): Do not treat _Atomic void as a qualified
1727 version of void.
1728
0c249d4b
DD
17292013-11-06 DJ Delorie <dj@redhat.com>
1730
1731 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1732 both explicit and builtin, print the location of the explicit one.
1733
6d7f7e0a
TB
17342013-11-05 Tobias Burnus <burnus@net-b.de>
1735
1736 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1737 c_parser_omp_distribute, c_parser_omp_teams,
1738 c_parser_omp_target, c_parser_omp_declare): Handle
1739 -fopenmp-simd.
1740
b906f4ca
MP
17412013-11-03 Marek Polacek <polacek@redhat.com>
1742
1743 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1744
ee1d5a02
JJ
17452013-11-01 Jakub Jelinek <jakub@redhat.com>
1746
1747 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1748 check_dup_generic at the end, unless remove is true.
1749 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1750 remove = true;.
1751 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1752
5a9785fb
JJ
17532013-10-31 Jakub Jelinek <jakub@redhat.com>
1754
1755 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1756 with decl that is not pointer nor array.
1757
939b37da
BI
17582013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1759
1760 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1761 a spawning function is found.
1762 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1763 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1764 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1765 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1766 case.
1767 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1768 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1769 expr.
1770 (c_finish_return): Added a check to reject _Cilk_spawn in return
1771 expression.
1772 (build_cilk_spawn): New function.
1773 (build_cilk_sync): Likewise.
1774 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1775
d4af74d4
TB
17762013-10-27 Tobias Burnus <burnus@net-b.de>
1777
1778 PR other/33426
1779 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1780 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1781 (c_parser_statement_after_labels): Update calls.
1782
d73749df 17832013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1784
1785 PR other/33426
1786 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1787 Handle PRAGMA_IVDEP.
1788 (c_parser_statement_after_labels): Update call.
1789
f28aa681
MP
17902013-10-24 Marek Polacek <polacek@redhat.com>
1791
1792 * c-parser.c (c_parser_struct_declaration): Add a comment.
1793 (c_parser_declarator): Don't allow _Alignas here.
1794
0645c1a2
AM
17952013-10-17 Andrew MacLeod <amacleod@redhat.com>
1796
1797 * c-parser.c: Include omp-low.h.
1798 * c-typeck.c: Likewise.
1799
568a31f2
MP
18002013-10-17 Marek Polacek <polacek@redhat.com>
1801
1802 PR c/58267
1803 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1804 Document syntax of the array-declarator.
1805 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1806 are not permitted.
1807 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1808 (c_parser_struct_declaration): Likewise.
1809 (c_parser_declarator): Likewise.
1810 (c_parser_direct_declarator_inner): Likewise.
1811 (c_parser_parameter_declaration): Likewise.
1812 (c_parser_type_name): Likewise.
1813
acf0174b
JJ
18142013-10-11 Jakub Jelinek <jakub@redhat.com>
1815
1816 * c-lang.h (current_omp_declare_target_attribute): New extern
1817 decl.
1818 * c-parser.c: Include c-lang.h.
1819 (struct c_parser): Change tokens to c_token *.
1820 Add tokens_buf field. Change tokens_avail type to unsigned int.
1821 (c_parser_consume_token): If parser->tokens isn't
1822 &parser->tokens_buf[0], increment parser->tokens.
1823 (c_parser_consume_pragma): Likewise.
1824 (enum pragma_context): Add pragma_struct and pragma_param.
1825 (c_parser_external_declaration): Adjust
1826 c_parser_declaration_or_fndef caller.
1827 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1828 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1829 Adjust recursive call.
1830 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1831 of pragma_external.
1832 (c_parser_parameter_declaration): Use pragma_param instead of
1833 pragma_external.
1834 (c_parser_compound_statement_nostart, c_parser_label,
1835 c_parser_for_statement): Adjust
1836 c_parser_declaration_or_fndef callers.
1837 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1838 it through to c_parser_conditional_expression.
1839 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1840 pass it through to c_parser_binary_expression. Adjust recursive
1841 call.
1842 (c_parser_binary_expression): Remove prec argument, add
1843 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1844 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1845 binop matches it, use build2 instead of parser_build_binary_op.
1846 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1847 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1848 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1849 Handle pragma_struct and pragma_param the same as pragma_external.
1850 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1851 (c_parser_omp_variable_list): Parse array sections for
1852 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1853 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1854 (c_parser_omp_clause_reduction): Handle user defined reductions.
1855 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1856 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1857 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1858 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1859 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1860 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1861 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1862 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1863 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1864 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1865 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1866 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1867 (c_parser_omp_for_loop): Add CODE argument, pass it through
1868 to c_finish_omp_for. Change last argument to cclauses,
1869 and adjust uses to grab parallel clauses from the array of all
1870 the split clauses. Adjust c_parser_binary_expression,
1871 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1872 (omp_split_clauses): New function.
1873 (c_parser_omp_simd): New function.
1874 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1875 Allow the function to be called also when parsing combined constructs,
1876 and call c_parser_omp_simd when parsing for simd.
1877 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1878 #pragma omp section, require exactly one structured-block instead of
1879 sequence of statements.
1880 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1881 Allow the function to be called also when parsing combined constructs.
1882 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1883 Allow the function to be called also when parsing combined
1884 constructs.
1885 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1886 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1887 c_parser_omp_teams, c_parser_omp_target_data,
1888 c_parser_omp_target_update, c_parser_omp_target,
1889 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1890 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1891 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1892 (c_parser_omp_construct): Add p_name and mask vars. Handle
1893 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1894 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1895 and c_parser_omp_sections callers.
1896 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1897 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1898 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1899 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1900 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1901 OMP_CLAUSE_DEPEND.
1902 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1903 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1904 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1905 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1906 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1907 * c-typeck.c: Include tree-inline.h.
1908 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1909 handle_omp_array_sections_1, handle_omp_array_sections,
1910 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1911 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1912 user defined reductions.
1913 (c_tree_equal): New function.
1914 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1915 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1916 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1917 c_check_omp_declare_reduction_r): New prototypes.
1918 * c-decl.c (current_omp_declare_target_attribute): New variable.
1919 (c_decl_attributes): New function.
1920 (start_decl, start_function): Use it instead of decl_attributes.
1921 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1922 c_omp_reduction_decl, c_omp_reduction_lookup,
1923 c_check_omp_declare_reduction_r): New functions.
1924
0a6c2227
TT
19252013-09-25 Tom Tromey <tromey@redhat.com>
1926
1927 * Make-lang.in (c/gccspec.o): Remove.
1928 (CFLAGS-c/gccspec.o): New variable.
1929 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1930 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1931 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1932
f3bc55f0
TT
19332013-09-25 Tom Tromey <tromey@redhat.com>
1934
1935 * Make-lang.in (c/gccspec.o): Don't use subshell.
1936
a24d975c
MP
19372013-09-18 Marek Polacek <polacek@redhat.com>
1938
1939 PR sanitize/58443
1940 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1941 Remove unnecessary check.
1942
ce6923c5
MP
19432013-09-18 Marek Polacek <polacek@redhat.com>
1944
1945 PR sanitizer/58411
1946 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1947 no_sanitize_undefined attribute.
1948
a1e51df9
KT
19492013-09-13 Kai Tietz <ktietz@redhat.com>
1950
1951 PR target/57848
1952 * c-decl.c (c_builtin_function_ext_scope): Remove
1953 wrong assumption that it is never called on prexisting
1954 symbol.
1955
0af94e6f
JR
19562013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1957
1958 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1959
20059c8b
GDR
19602013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1961
1962 * c-objc-common.c (c_tree_printer): Tidy.
1963
de5a5fa1
MP
19642013-08-30 Marek Polacek <polacek@redhat.com>
1965
1966 * c-typeck.c (build_binary_op): Add division by zero and shift
1967 instrumentation.
1968
2531a1d9 19692013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1970 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1971
6e2bcc98 1972 PR c/35649
2531a1d9
JR
1973 * c-typeck.c (c_common_type): Prefer double_type_node over
1974 other REAL_TYPE types with the same precision.
1975 (convert_arguments): Likewise.
1976
025311c4
GDR
19772013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1978
1979 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1980 (c_initialize_diagnostics): Call a destructor for the early printer.
1981
da6ca2b5
GDR
19822013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1983
1984 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1985 printer initialization.
1986
318cda85 19872013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1988
318cda85
BI
1989 PR c/57490
1990 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1991 check for truth values.
1992 (expand_array_notation_exprs): Added truth values case. Removed an
1993 unwanted else. Added for-loop to walk through subtrees in default
1994 case.
1995
b066401f
GDR
19962013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1997
1998 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1999
fb48aadc
JM
20002013-07-23 Joseph Myers <joseph@codesourcery.com>
2001
2002 * c-parser.c (struct c_generic_association): Fix typo.
2003
433cc7b0
TT
20042013-07-23 Tom Tromey <tromey@redhat.com>
2005 Joseph Myers <joseph@codesourcery.com>
2006
2007 * c-parser.c (struct c_generic_association): New.
2008 (c_generic_association_d): New typedef.
2009 (c_parser_generic_selection): New function.
2010 (c_parser_postfix_expression): Handle RID_GENERIC.
2011
26d40c3d
JM
20122013-07-13 Jason Merrill <jason@redhat.com>
2013
2014 PR c++/57793
2015 * c-decl.c (finish_struct): Check for too-large class.
2016
ecdbd01a 20172013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2018
2019 PR c/57821
2020 * c-typeck.c (set_init_index): When folding, check for index overflow.
2021
1141ed3f
BI
20222013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2023
2024 * c-parser.c (c_parser_array_notation): Removed rejection of array
2025 notations in an array of function pointers.
2026
713b46fa
BI
20272013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2028
2029 * c-array-notation.c (make_triplet_val_inv): New function.
2030 (create_cmp_incr): Likewise.
2031 (create_array_refs): Likewise.
2032 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2033 Also modularized common parts between functions and called the function.
2034 (build_array_notation_expr): Likewise.
2035 (fix_conditional_array_notations_1): Likewise.
2036 (fix_array_notation_expr): Likewise.
2037 (fix_array_notation_call_expr): Likewise.
2038
92f20202
MP
20392013-06-18 Marek Polacek <polacek@redhat.com>
2040
2041 PR c/57630
2042 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2043
73a23b06
BI
20442013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2045
2046 * c-array-notation.c (build_array_notation_expr): Reject array notation
2047 mismatch between LHS and RHS even inside a call_expr. Also, removed
2048 a couple while statements that were dead code.
2049
00b8517d
BI
20502013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2051
2052 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2053 excessive precision expressions in function parameters. Also removed
2054 couple unwanted while statements.
2055
1509bdda
BI
20562013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2057
2058 * c-array-notation.c (expand_array_notation_exprs): Added
2059 ARRAY_NOTATION_REF case.
2060
d60f1706
BI
20612013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2062
2063 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2064 function to c-family/array-notation-common.c.
2065 (is_cilkplus_reduce_builtin): Likewise.
2066 (find_rank): Likewise.
2067 (extract_array_notation_exprs): Likewise.
2068 (replace_array_notations): Likewise.
2069 (find_inv_trees): Likewise.
2070 (replace_inv_trees): Likewise.
2071 (contains_array_notation_expr): Likewise.
2072 (find_correct_array_notation_type): Likewise.
2073 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2074 (struct inv_list): Moved this to c-family/array-notation-common.c.
2075 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2076
6d6efbb3
BI
20772013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2078
2079 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2080 reduction functions outside the for-loop. Added a check if the fundecl
2081 is non-NULL. Finally, removed an unwanted if-statement, and made the
2082 body unconditional.
2083
25c22937
BI
20842013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2085
2086 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2087 condition of the if-statement matches the rank of else-block and then-
2088 block when array notations are used.
2089 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2090 expression after the entire function body is parsed.
2091 (c_parser_expr_no_commas): Delayed creating array notation expressions
2092 to the end of function parsing.
2093 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2094 whole if-statement instead of just the condition.
2095 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2096
edd25645
BI
20972013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2098
2099 PR c/57474
2100 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2101 array to NULL_TREE if they are unused. Also added a check for the
2102 field to be NULL before its fields are used in future.
2103
065ce7f1
RO
21042013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2105
2106 PR bootstrap/57450
2107 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2108 (build_array_notation_expr): Likewise.
2109
36536d79
BI
21102013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2111
2112 * c-typeck.c (build_array_ref): Added a check to see if array's
2113 index is greater than one. If true, then emit an error.
2114 (build_function_call_vec): Exclude error reporting and checking
2115 for builtin array-notation functions.
2116 (convert_arguments): Likewise.
2117 (c_finish_return): Added a check for array notations as a return
2118 expression. If true, then emit an error.
2119 (c_finish_loop): Added a check for array notations in a loop
2120 condition. If true then emit an error.
2121 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2122 (build_binary_op): Added a check for array notation expr inside
2123 op1 and op0. If present, we call another function to find correct
2124 type.
2125 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2126 * c-parser.c (c_parser_compound_statement): Check if array
2127 notation code is used in tree, if so, then transform them into
2128 appropriate C code.
2129 (c_parser_expr_no_commas): Check if array notation is used in LHS
2130 or RHS, if so, then build array notation expression instead of
2131 regular modify.
2132 (c_parser_postfix_expression_after_primary): Added a check for
2133 colon(s) after square braces, if so then handle it like an array
2134 notation. Also, break up array notations in unary op if found.
2135 (c_parser_direct_declarator_inner): Added a check for array
2136 notation.
2137 (c_parser_compound_statement): Added a check for array notation in
2138 a stmt. If one is present, then expand array notation expr.
2139 (c_parser_if_statement): Likewise.
2140 (c_parser_switch_statement): Added a check for array notations in
2141 a switch statement's condition. If true, then output an error.
2142 (c_parser_while_statement): Similarly, but for a while.
2143 (c_parser_do_statement): Similarly, but for a do-while.
2144 (c_parser_for_statement): Similarly, but for a for-loop.
2145 (c_parser_unary_expression): Check if array notation is used in a
2146 pre-increment or pre-decrement expression. If true, then expand
2147 them.
2148 (c_parser_array_notation): New function.
2149 * c-array-notation.c: New file.
2150 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2151
cd192ccc
MS
21522013-05-23 Mike Stump <mikestump@comcast.net>
2153
2154 * c-typeck.c (convert_for_assignment): Handle references to memory
2155 spaces better.
2156
427b248d
JM
21572013-05-16 Jason Merrill <jason@redhat.com>
2158
2159 * Make-lang.in (cc1$(exeext)): Use link mutex.
2160
44d90fe1
PC
21612013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2162
2163 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2164 to simply use OPT_Wpointer_arith.
2165 (build_unary_op): Likewise.
2166
4e7d7b3d
JJ
21672013-04-03 Jakub Jelinek <jakub@redhat.com>
2168
2169 PR c/19449
2170 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2171 argument. If set, or it temporarily for parsing of the first
2172 argument into force_folding_builtin_constant_p.
2173 (c_parser_postfix_expression): Adjust callers.
2174
839b422f
RB
21752013-03-21 Richard Biener <rguenther@suse.de>
2176
2177 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2178 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2179
2ee028f1
MP
21802013-02-12 Marek Polacek <polacek@redhat.com>
2181
2182 PR c/44938
2183 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2184 origtypes to NULL.
2185
8824edff
JJ
21862013-01-24 Jakub Jelinek <jakub@redhat.com>
2187
2188 PR c/56078
2189 * c-typeck.c (set_nonincremental_init_from_string): If
2190 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2191 returned false.
2192 (process_init_element): Likewise.
2193
eadd3d0d
JJ
21942012-12-20 Jakub Jelinek <jakub@redhat.com>
2195
2196 PR c++/55619
2197 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2198 argument, don't call default_function_array_conversion
2199 nor c_fully_fold here.
2200 (c_parser_asm_statement): Adjust callers.
2201 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2202 and outputs here, and call default_function_array_conversion
2203 on inputs that don't need to be addressable.
2204
f8a93a2e
JJ
22052012-12-18 Jakub Jelinek <jakub@redhat.com>
2206
2207 PR c/39464
2208 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2209 warning require that both c_common_unsigned_type as well as
2210 c_common_signed_type is the same for both mvl and mvr types.
2211
9771b263
DN
22122012-11-16 Diego Novillo <dnovillo@google.com>
2213
2214 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2215
2216 * c-common.c: Use new vec API in vec.h.
2217 * c-common.h: Likewise.
2218 * c-gimplify.c: Likewise.
2219 * c-pragma.c: Likewise.
2220 * c-pretty-print.c: Likewise.
2221 * c-pretty-print.h: Likewise.
2222 * c-semantics.c: Likewise.
2223 * c-decl.c: Likewise.
2224 * c-parser.c: Likewise.
2225 * c-tree.h: Likewise.
2226 * c-typeck.c: Likewise.
2227
880661a4
JW
22282012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2229
2230 PR c++/54930
2231 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2232
077d1abe
MLI
22332012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2234
2235 PR c/53066
2236 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2237 shadows a function, unless the variable is a function or a
2238 pointer-to-function.
2239
3a785c97
JJ
22402012-10-12 Jakub Jelinek <jakub@redhat.com>
2241
2242 PR c/54381
2243 * c-parser.c (struct c_tree_loc_pair): Removed.
2244 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2245 add location_t * and tree * arguments, fill in array of 3
2246 sizeof_arg trees and corresponding locs.
2247 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2248 c_parser_expr_list callers.
2249 (c_parser_postfix_expression_after_primary): Likewise. Pass
2250 array of 3 sizeof_arg trees and locs (corresponding to first
2251 3 arguments) to sizeof_pointer_memaccess_warning.
2252
703c8606
LC
22532012-10-09 Lawrence Crowl <crowl@google.com>
2254
2255 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2256 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2257 hash table.
2258
5d9de0d0
PC
22592012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2260
2261 PR c++/54194
2262 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2263 call.
2264
a212e43f
MG
22652012-10-09 Marc Glisse <marc.glisse@inria.fr>
2266
2267 PR c++/54427
2268 * c-typeck.c: Include c-common.h.
2269 (enum stv_conv): Moved to c-common.h.
2270 (scalar_to_vector): Moved to c-common.c.
2271 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2272 * Make-lang.in: c-typeck.c depends on c-common.h.
2273
3b78de56
AC
22742012-10-04 Arnaud Charlet <charlet@adacore.com>
2275
2276 * c-decl.c (c_write_global_declarations): Fix handling of
2277 -fdump-ada-spec*.
2278
78c60e3d
SS
22792012-09-30 Sharad Singhai <singhai@google.com>
2280
2281 * c-decl.c (c_write_global_declarations): Use a different method
2282 to determine if the dump has ben initialized.
2283
9f33203d
JM
22842012-09-14 Joseph Myers <joseph@codesourcery.com>
2285
2286 PR c/54552
2287 * c-typeck.c (c_cast_expr): When casting to a type requiring
2288 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2289 c_fully_fold first.
2290
a27d595d
JM
22912012-09-14 Joseph Myers <joseph@codesourcery.com>
2292
2293 PR c/54103
2294 * c-typeck.c (build_unary_op): Pass original argument of
2295 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2296 any C_MAYBE_CONST_EXPR, if it has integer operands.
2297 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2298 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2299 to c_objc_common_truthvalue_conversion, then remove any
2300 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2301 c_objc_common_truthvalue_conversion not
2302 c_common_truthvalue_conversion.
2303 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2304 call note_integer_operands for arguments with integer operands
2305 that are not integer constants.
2306
9feb29df
JJ
23072012-09-13 Jakub Jelinek <jakub@redhat.com>
2308
2309 PR c/54559
2310 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2311 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2312
d409320c
JJ
23132012-08-31 Jakub Jelinek <jakub@redhat.com>
2314
2315 PR c/54428
2316 * c-convert.c (convert): Don't call fold_convert_loc if
2317 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2318 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2319 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2320
6265d07c
JJ
23212012-08-24 Jakub Jelinek <jakub@redhat.com>
2322
2323 PR c/54355
2324 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2325 for nested and empty_ok arguments in the call to
2326 c_parser_declaration_or_fndef.
2327
1a4049e7
JJ
23282012-08-17 Jakub Jelinek <jakub@redhat.com>
2329
2330 * c-tree.h (c_last_sizeof_arg): Declare.
2331 * c-parser.c (struct c_tree_loc_pair): New type.
2332 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2333 non-NULL.
2334 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2335 (c_parser_postfix_expression_after_primary): Likewise. Call
2336 sizeof_pointer_memaccess_warning if needed.
2337 (sizeof_ptr_memacc_comptypes): New function.
2338 * c-typeck.c (c_last_sizeof_arg): New global variable.
2339 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2340
0229aee9
UB
23412012-07-24 Uros Bizjak <ubizjak@gmail.com>
2342
2343 * c-lang.h (lang_decl): Add variable_size GTY option.
2344
7ee2468b
SB
23452012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2346
2347 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2348 * Make-lang.in: Fix dependencies.
2349
d4a10d0a
SB
23502012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2351
2352 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2353 and add language Makefile hooks.
2354 * config-lang.in: New file.
2355 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2356 add the required "normal" config-lang.in rules.
2357 * c-lang.h: Moved from gcc/ to here.
2358 * c-tree.h: Likewise.
2359 * c-objc-common.c: Likewise.
2360 * c-objc-common.h: Likewise.
2361 * c-typeck.c: Likewise.
2362 * c-convert.c: Likewise.
2363 * c-lang.c: Likewise.
2364 * c-aux-info.c: Likewise.
2365 * c-errors.c: Likewise.
2366 * gccspec.c: Likewise.
2367 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2368 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2369\f
5624e564 2370Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2371
2372Copying and distribution of this file, with or without modification,
2373are permitted in any medium without royalty provided the copyright
2374notice and this notice are preserved.